package com.fzkj.shejimoshi.adapter2;

import com.fzkj.shejimoshi.adapter2.adapter.AdapterImprove;
import com.fzkj.shejimoshi.adapter2.adapter.ElectricAdapter;
import com.fzkj.shejimoshi.adapter2.motor.ElectricMotor;
import com.fzkj.shejimoshi.adapter2.motor.Motor;
import com.fzkj.shejimoshi.adapter2.motor.OpticalMotor;

/**
 * @DESCRIPTION: TODO
 * @AUTHOR: AnotherOne
 * @DATE: 2021/8/13 15:41
 */
public class Test {

    public static void main(String[] args) throws Exception{
        Motor motor = new ElectricAdapter(new ElectricMotor());
        motor.drive();

        Motor mo = new AdapterImprove(OpticalMotor.class);
        mo.drive();
    }

}
